package lu.med.praxiswahl.wahlumed.client.patienten;

import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.Image;

import javax.swing.JFrame;
import javax.swing.JScrollPane;

@SuppressWarnings("serial")
class ImageViewer extends JFrame
{
    public ImageViewer(Image im)
    {
	super("Bild Anzeige");
	this.setDefaultCloseOperation(HIDE_ON_CLOSE);
	this.setLayout(new BorderLayout());
	ImageArea imA = new ImageArea();
	imA.setImage(im);
	JScrollPane jsp = new JScrollPane(imA);
	this.add(jsp, BorderLayout.CENTER);
	this.pack();
	this.setVisible(true);
    }

    @Override
    public void setVisible(boolean in)
    {
	super.setVisible(in);
	this.setExtendedState(Frame.MAXIMIZED_BOTH);
    }

}